package cn.com.zcode.exam.model;

import java.util.Date;
import java.util.List;
import java.util.Set;

import org.apache.struts2.json.annotations.JSON;

import cn.com.zcode.core.model.BaseModelSupport;
import cn.com.zcode.user.model.User;

public class Examination extends BaseModelSupport {
	private static final long serialVersionUID = 1L;
	public static final int INVIAL = -1;
	public static final int ACTIVE = 0;
	public static final int FINISH = 1;

	private int state = ACTIVE;
	private int questionCount;
	private int correntCount = 0;
	private int wrongCount = 0;
	private double score;
	private boolean forWrong;

	private String title;
	private Date staTime;
	private Date endTime;
	private String type;
	private Date lastAnswerDate;
	private User user;
	private Paper paper;
	private Set<Answer> answers;
	
	private List<Question> questions;
	

	public int getCorrentCount() {
		return correntCount;
	}

	public void setCorrentCount(int correntCount) {
		this.correntCount = correntCount;
	}

	public int getWrongCount() {
		return wrongCount;
	}

	public void setWrongCount(int wrongCount) {
		this.wrongCount = wrongCount;
	}

	public Examination() {
		super();
	}

	public Paper getPaper() {
		return paper;
	}

	public void setPaper(Paper paper) {
		this.paper = paper;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	@JSON(format = "yyyy-MM-dd HH:mm:ss")
	public Date getStaTime() {
		return staTime;
	}

	public void setStaTime(Date staTime) {
		this.staTime = staTime;
	}

	@JSON(format = "yyyy-MM-dd HH:mm:ss")
	public Date getEndTime() {
		return endTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}

	public int getState() {
		return state;
	}

	public void setState(int state) {
		this.state = state;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public double getScore() {
		return score;
	}

	public void setScore(double score) {
		this.score = score;
	}

	public Set<Answer> getAnswers() {
		return answers;
	}

	public void setAnswers(Set<Answer> answers) {
		this.answers = answers;
	}

	 

	public boolean isForWrong() {
		return forWrong;
	}

	public void setForWrong(boolean forWrong) {
		this.forWrong = forWrong;
	}

	public int getQuestionCount() {
		return questionCount;
	}

	public void setQuestionCount(int questionCount) {
		this.questionCount = questionCount;
	}

	@JSON(format = "yyyy-MM-dd HH:mm:ss")
	public Date getLastAnswerDate() {
		return lastAnswerDate;
	}
	public void setLastAnswerDate(Date lastAnswerDate) {
		this.lastAnswerDate = lastAnswerDate;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public List<Question> getQuestions() {
		return questions;
	}

	public void setQuestions(List<Question> questions) {
		this.questions = questions;
	}



}
